<h3><?php echo Araclar::yaz("Mesaj Kutusu","Message Box"); ?></h3>
<table width="100%">
	<tr>
		<td>
			<b><?php echo Araclar::yaz("Mesaj Yaz","Compose"); ?></b>
		</td>
		<td align="right" width="150px">
			<?php echo "<a href='".Yii::app()->createUrl('iletisim/gelen')."' class='button normal'>".Araclar::yaz("Geri","Back")."</a>"; ?>
		</td>
	</tr>
</table>
<?php
$mesajlar_id = $_REQUEST["mesajlar_id"];
$kime = "";
$baslik = "";
$mesaj = "";
if(!empty($mesajlar_id)){
	$m = Mesajlar::model()->findByPk($mesajlar_id);
	$kime = $m->kime;
	$baslik = "Yanıt: ".$m->baslik;
	$mesaj = "";
}
if(!empty($_REQUEST["kime"])){
	$kime = $_REQUEST["kime"];
}
echo CHtml::form();
?>
<table width="100%">
	<tr>
		<td width='200px'>
			<?php echo Araclar::yaz("Kime","To"); ?>:
		</td>
		<td>
			<?php
				$k = Kullanicilar::model()->findAll("yetki='1'");
				echo CHtml::dropDownList('kime', $kime, CHtml::listData($k, 'id', 'ad_soyad'));
			?>
		</td>
	</tr>
	<tr>
		<td>
			<?php echo Araclar::yaz("Başlık","Title"); ?>:
		</td>
		<td>
			<?php echo "<input type='text' name='baslik' value='$baslik' size='50' />"; ?>
		</td>
	</tr>
	<tr>
		<td>
			<?php echo Araclar::yaz("Mesaj","Message"); ?>:
		</td>
		<td>
			<?php echo "<textarea name='mesaj' cols='50' rows='4'>$mesaj</textarea>"; ?>
		</td>
	</tr>
	<tr>
		<td>
			
		</td>
		<td>
			<?php echo CHtml::submitButton(Araclar::yaz('Gönder','Send'),array('class'=>'button normal')); ?>
		</td>
	</tr>
</table>
<?php 
echo CHtml::endForm();
?>